<template>
  <div class="systemSetting">
    <el-button class="button-setting" @click="SET_SHOW_H5_ADDRESS" title="网易官方页面">显示 / 隐藏 - 网易云官方页面</el-button>
    <el-button class="button-setting" @click="SET_IS_SHOW_AUTH" title="作者标题">显示 / 隐藏 - 作者</el-button>
    <div class="auth-input-box">
      <el-input placeholder="请输入新作者" clearable class="auth-input" v-model="authName">
      </el-input>
        <el-button type="primary" class="a-b-l" @click="authSave">确定</el-button>
    </div>
  </div>
</template>

<script>
import {SET_SHOW_H5_ADDRESS,SET_IS_SHOW_AUTH,SET_APP_NAME} from "@/setting"
  export default {
    name:"systemSetting",
    data() {
      return {
        SET_SHOW_H5_ADDRESS,
        SET_IS_SHOW_AUTH,
        authName:""
      }
    },
    methods: {
      authSave() {
        if(!this.authName.trim() || this.authName.trim().length < 2){
          this.$Notification("请输入新作者,最少2位","warning")
          return
        }
        SET_APP_NAME(this.authName);
      }
    },
  }
</script>

<style lang="scss" scoped>
.systemSetting{
  padding:40px;
  .button-setting{
    background-color: #363636;
    color:#fff;
  }
  .auth-input-box{
    margin-top:20px;
    .auth-input{
      width:300px;
    }
    .a-b-l{
      margin-left:10px;
    }
  }
}
</style>